<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>成绩查询</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<script src="js/jquery.min.js"></script>
	<script src="js/f/default.js"></script>
	<link rel="stylesheet" type="text/css" href="css/f/navs.css">
	<link rel="stylesheet" type="text/css" href="css/f/default.css">
	<link rel="stylesheet" type="text/css" href="css/f/assignment.css"/>
	<link rel="stylesheet" type="text/css" href="css/f/yhy.css">
	
  </head>
  <body>
  <div class="all">
  	<jsp:include page="/nav.jsp"></jsp:include>
	  	<div class="rightall float-left">
		  	<div class="already">
			  	<div class="already-title"><div class="left">所有成绩</div></div>
				    
				    		<div class="abc">
						  	<form method="post" action="cadre/queryStuGrade.do" >  
									<input  class="gezidaxiao" type="text" name="search" placeholder="学生名字" value="${search }">
									<input class="btn-style-er" type="submit" value="搜索"><br/>
									<input type="hidden" name="pageno" value="${pageNo }" /> 
									<select class="danxuaner" name="examtype" onchange="course();">
										<option value="all">全部科目</option>
										<c:forEach var="type" items="${examtypes}">
											<option value="${type.examTypeName }">${type.examTypeName}</option>
										</c:forEach>	
									</select>
									<select class="danxuan" name="examname">
											 <option value="all" >--请选择--</option>  
									<c:forEach var="e" items="${course}">
											 <option value="${e.courseName }">${e.courseName }</option>
									</c:forEach>
									</select>
								</form>  
							</div>
					
					<br/>
					<table>
						<tr class="tr-style-head">
							<td>考试类型</td>
							<td>考试科目</td>
							<td>考试时间</td>
							<td>学生姓名</td>
							<td>成绩</td>
						</tr>
					<c:forEach var="li" items="${gradelist}">
						<tr class="tr-style">
							<td>${li.examTypeName }</td>
							<td>${li.courseName }</td>
							<td><fmt:formatDate value="${li.examTime }" pattern="yyyy-MM-dd hh:mm"/></td>
							<td>${li.stuName }</td>
							<td>${li.stuScore }</td>
						</tr>
					</c:forEach>
					</table>
                  	<c:if test="${totalPage > 1 }">
	               		<div class="previous">
		               		<c:if test="${pageNo>1}">
		                    	<a href="cadre/queryStuGrade.do?pageNo=${pageNo-1 }">上一页</a>
		                	</c:if>
		                   	<c:forEach var="p" begin="1" end="${totalPage }" step="1">
		                   		<c:if test="${p==pageNo }">
		                   			<span style="font-size:18px;color:#446ee6;">&nbsp;${p}&nbsp;</span>
		                   		</c:if>
		                   		<c:if test="${p!=pageNo }">
		                   			<a href="cadre/queryStuGrade.do?pageNo=${p }" >&nbsp;${p}&nbsp;</a>
		                   		</c:if>
		                   	</c:forEach>
		                    <c:if test="${pageNo<totalPage}">
		                    	<a href="cadre/queryStuGrade.do?pageNo=${pageNo+1 }">下一页</a>
		                	</c:if>
	                   </div>
               	 	</c:if>
                    <!--<div class="float-right excel"><button name="" class="btn-style">导出文件</button></div>  -->
				</div>
			</div>
	</div>
  </body>
</html>
